package com.gosophia.conference.action.summary;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.conferenceManagement.summary.dto.SummaryJobDataDTO;
import com.gosophia.conferenceManagement.summary.ws.SummaryWebService;

/**
 * 跳转到审核详细信息action
 * @author mayue
 *
 */
@Scope("prototype")
@Controller("ToApprovalDetailAction")
public class ToApprovalDetailAction extends BaseSupportAction{

    private static final long serialVersionUID = 1L;

    @Autowired
    private SummaryWebService summaryWebService;
    
    private SummaryJobDataDTO summaryJobDataDTO;
    
    //在线文档在仓库中的路径
    private String onlinePath;
    //在线文档版本
    private String onlineVersion;
    //设置文档为不可编辑
    private String onlineIsEdit = "unEdit";
    
    private Long jobId;
    
    @Override
    public String _execute() throws Exception {
        summaryJobDataDTO = summaryWebService.findSummaryJobDataByJobDataId(jobId);
        if(summaryJobDataDTO!=null && summaryJobDataDTO.getOnlineDocumentDTO()!=null){
            onlinePath = summaryJobDataDTO.getOnlineDocumentDTO().getDocumentPath();
            onlineVersion= summaryJobDataDTO.getOnlineDocumentDTO().getDocumentVersion();
        }
        return SUCCESS;
    }

    public SummaryJobDataDTO getSummaryJobDataDTO() {
        return summaryJobDataDTO;
    }

    public void setSummaryJobDataDTO(SummaryJobDataDTO summaryJobDataDTO) {
        this.summaryJobDataDTO = summaryJobDataDTO;
    }

    public Long getJobId() {
        return jobId;
    }

    public void setJobId(Long jobId) {
        this.jobId = jobId;
    }

    public String getOnlinePath() {
        return onlinePath;
    }

    public void setOnlinePath(String onlinePath) {
        this.onlinePath = onlinePath;
    }

    public String getOnlineVersion() {
        return onlineVersion;
    }

    public void setOnlineVersion(String onlineVersion) {
        this.onlineVersion = onlineVersion;
    }

    public String getOnlineIsEdit() {
        return onlineIsEdit;
    }

    public void setOnlineIsEdit(String onlineIsEdit) {
        this.onlineIsEdit = onlineIsEdit;
    }
    
}
